<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
var p = prompt("购买几月份的票");
    if (p > 4 && p < 11){
        var s = prompt("购买头等舱还是经济舱");
        if (s == "头等舱"){
            console.log("机票价格2000");
        }else {
            console.log("机票价格800");
        }
    }else {
        var a = prompt("购买头等舱还是经济舱");
        if (a == "头等舱"){
            console.log("机票价格800");
        }else {
            console.log("机票价格200");
        }
    }
</script>
</body>
</html>